<!--
 * @Description:
 * @version:
 * @Author: 尹鹏孝
 * @Date: 2023-03-06 17:24:39
 * @LastEditors: 尹鹏孝
 * @LastEditTime: 2023-03-06 17:29:48
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>异步组件</title>
</head>
<body>
import { defineAsyncComponents} from 'vue'
const asyncComp = defineAsyncComponents(()=>{
    <!-- return new Promise((resolve,reject)=>{
        resolve()
    }) -->
    import('组件路径')

})

const dds = defineAsyncComponents({
    loader:()=>import('.//'),
    loadingComponent:loading,
    delay:200,
    errorComponents:Error,
    timeout:3000
})
</body>
</html>